<script setup>
    import { onBeforeMount,ref } from 'vue';
import emitter from '../libs/bus.js'
let str = ref('这是A组件')
const btn = ()=>{
    emitter.emit('btn',str.value)
}
</script>

<template>
    <div>
        <h1>A组件</h1>
        <button @click="btn">点击发送</button>
    </div>
</template>

<style scope>

</style>
